import { ref, watch, reactive } from 'vue'
const c = ref(999)
export default class Test {
  constructor() {
    this.a = 1
    this.b = 2
    this.list = reactive([])
    watch(
      this.list,
      function() {
        console.log(`newList`)
      },
      {
        deep: true
      }
    )

    this.vp = new VideoPlay()
  }
  m1() {
    this.a++
    this.list.push(new Date())
    console.log(c)
  }
  m2() {
    this.b++
  }
}

class VideoPlay {
  constructor() {
    this.now = 0
    this.duration = 0
    this.src = ''
    this.tid = null
  }
  play() {
    this.tid = setInterval(() => {
      this.now++
    }, 1e3)
  }
  pause() {
    clearInterval(this.tid)
  }
  fullscreen() {}
  setRate() {}
  setQuality() {}
}
